-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the matrix representation of CUGate
in Rust
#13121
Conversation
Co-authored-by: Matthew Treinish <[email protected]>
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 10794415482Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I double checked: https://github.com/Qiskit/qiskit/blob/main/qiskit/circuit/library/standard_gates/u.py#L357-L375 and this is correct the angles were backwards in rust and we didn't catch it because the tests were using the same values for all the parameters.
Co-authored-by: Matthew Treinish <[email protected]> (cherry picked from commit 8929e12)
Co-authored-by: Matthew Treinish <[email protected]> (cherry picked from commit 8929e12) Co-authored-by: Julien Gacon <[email protected]>
Summary
Fixed #13118.
Details and comments
The matrix representation of
CUGate
in Rust accidentally swapped two arguments (phi
andlam
). This didn't fail the tests, because there all parameters are set to the same value. The tests are therefore also updated to vary the parameters values within a gate.